home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1701 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: giane.cs.umass.edu!ramanath
  2. From: ramanath@giane.cs.umass.edu (Kumaresan Ramanathan)
  3. Newsgroups: comp.lang.c
  4. Subject: Digest, Macro disadv
  5. Date: 15 Jan 1996 19:29:34 GMT
  6. Organization: CS Dept., Umass-Amherst
  7. Message-ID: <4de9uu$ptv@kernighan.cs.umass.edu>
  8. NNTP-Posting-Host: giane.cs.umass.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Hi,
  12.   Some time last week I had asked about the disadvantages of using macros
  13. instead of a code generator to extend the C language.
  14.   The responses were quite interesting, but many repeated the disadvantages
  15. I had already mentioned in my original posting.
  16.   As I promised this is the digest of what was new.
  17.   If I missed anything or anybody's contribution, please accept my apologies.
  18. I did my best to keep track of the thread.
  19.  
  20. 1) Macros cannot define other macros. 
  21.         Though this may not be immediately obvious, it really is useful
  22. to be able to define macros using other macros. I do not want to start a
  23. flame war about safety of macros, but this point is important. CPP is not
  24. really very powerful and in many cases it is insufficient.
  25.  
  26. 2) Macros are capable only of simple inserts. That is macro expansion is not 
  27. very intelligent or programmable.
  28.  
  29. Thanks. to all those who responded.
  30.     --- Kumaresan
  31.